function btn_move(el,mouseLeft,mouseTop){
    var leftRnd=(Math.random()-0.5)*50;
    var topRnd=(Math.random()-0.5)*50;
    var btnLeft=mouseLeft+(leftRnd>0?100:-100)+leftRnd;
    var btnTop=mouseTop+(topRnd>0?100:-100)+topRnd;
    btnLeft=btnLeft<100?(btnLeft+window.innerWidth-200):(btnLeft>window.innerWidth-100?btnTop-window.innerHeight+200:btnTop);
    el.style.position='absolute';
    el.style.left=btnLeft+'px';
    el.style.top=btnTop+'px';
}

function over_btn(e){
    if(!e){
        e=window.Event;
    }
    btn_move(this,e.clientX,e.clientY);
}

document.getElementById('s_btn_wr').onmouseover=over_btn;
